#pragma once
#include <YSimpleSystem/YSimpleSystem.h>
#include <YSimpleSystem/IProactor.h>
#include <YSimpleSystem/IThread.h>
#include <YSimpleSystem/YProactorTokenOnExitProactor.h>
#include <vector>



namespace ysimple_system
{
	class YProactor 
		: public IProactor
		, public IThreadCallback
	{
		
		HANDLE m_hIOCP;
		std::vector< THREAD_SPTR >	m_threads;
		YProactorTokenOnExitProactor	m_exitProactorToken;
	public:
		YProactor(void);
		virtual ~YProactor(void);

		bool	init(DWORD concurrentThreadCount, DWORD workerCount) override;
		bool	associate(HANDLE	handle, void* completionKey) override;
		void	running() override;
		void	release() override;
		
	};


}
